<template>
	<view class="page">
		<view class="flex benben-position-layout flex flex-wrap align-center learningMaterials_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub learningMaterials_fd0_0'>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  learningMaterials_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<text class='learningMaterials_fd0_0_c1'>精华专区</text>
				<view class='flex flex-wrap align-center learningMaterials_fd0_0_c2'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#1593FF"></u-loading>
			<view>加载中</view>
		</view>
		<!---flex布局flex布局开始-->
		<view class="flex flex-direction align-stretch benben-flex-layout learningMaterials_flex_1" v-else>
			<template v-for='(item,key0) in dataList'>
				<view class='flex flex-wrap align-center learningMaterials_fd1_0' @tap="getDetails(key0)" :key='key0'>
					<image class='learningMaterials_fd1_0_c0' mode="aspectFit" :src='item.image'></image>
					<view class='flex flex-direction flex-wrap align-stretch flex-sub'>
						<view class='learningMaterials_fd1_0_c1_c0'>{{item.title}}</view>
						<view class='flex flex-wrap align-center'>
							<image class='learningMaterials_fd1_0_c1_c1_c0' mode="aspectFit" :src='STATIC_URL+"74.png"'>
							</image>
							<text class='learningMaterials_fd1_0_c1_c1_c1'>{{item.create_time}}</text>
						</view>
					</view>
				</view>
			</template>

		</view>
		<!---flex布局flex布局结束-->
		<!---flex布局flex布局开始-->
		<view class="noData" v-if="dataList.length == 0 && !isShow">
			<image :src='STATIC_URL+"no.png"'></image>
		</view>
		<!---flex布局flex布局结束-->

	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},

		data() {
			return {
				"dataList": [],
				"isShow": true,
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			this.getdataList()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getdataList();
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取学习资料列表
			async getdataList() {
				//请求方法
				//数据验证
				let dataListData = await this.$api.post(global.apiUrls.post6309c32a957c7, {
					city: uni.getStorageSync('city')
				});
				this.isShow = false;
				if (dataListData.data.code != 1) {
					this.$message.info(dataListData.data.msg);
					return
				}
				uni.stopPullDownRefresh();
				let dataListinfo = dataListData.data;
				this.dataList = dataListinfo.data
				// console.log(this.dataList);
			},
			getDetails(k) {
				uni.setStorageSync('pdf', this.dataList[k].pdf_file);
				uni.navigateTo({
					url: '/pages/index/details/pdf'
				})
			}
		},
		
	};
</script>
<style lang="scss" scoped>
	.learningMaterials_fd2_0 {
		width: 100%;
		padding: 50rpx 0rpx 50rpx 0rpx;
	}

	.learningMaterials_fd2_0_c0 {
		width: 400rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.learningMaterials_fd2_0_c1 {
		padding: 30rpx 0rpx 0rpx 0rpx;
		color: #929292;
	}

	.learningMaterials_fd1_0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.learningMaterials_fd1_0_c0 {
		width: 248rpx;
		height: 186rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
	}

	.learningMaterials_fd1_0_c1_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 400;
		color: #333333 !important;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		margin: 0rpx 0rpx 40rpx 0rpx;
	}

	.learningMaterials_fd1_0_c1_c1_c0 {
		width: 28rpx;
		height: 28rpx;
		margin: 0rpx 12rpx 0rpx 0rpx;
	}

	.learningMaterials_fd1_0_c1_c1_c1 {
		line-height: 33rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
	}

	.learningMaterials_flex_1 {
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.learningMaterials_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.learningMaterials_fd0_0_c0_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #fff;
		line-height: 36rpx;
	}

	.learningMaterials_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #fff;
		line-height: 50rpx;
	}

	.learningMaterials_fd0_0_c2 {
		width: 36rpx;
		height: 36rpx;
	}

	.learningMaterials_flex_0 {
		background: url(https://app.ezsdcsm.com/images/91.png) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% 100% !important;
	}

	.page {
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto !important;
	}
</style>
